import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home.vue' // 确保路径正确
import About from '@/views/About.vue' // 确保路径正确
import CampusBinhai from '../components/CampusBinhai.vue'
import CampusChashan from '../components/CampusChashan.vue'
import CampusYueqing from '../components/CampusYueqing.vue'
import StudentSystem from '../components/StudentSystem.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/about',
    name: 'About',
    component: About
  },
  {
    path: '/campus/binhai',
    name: 'CampusBinhai',
    component: CampusBinhai
  },
  {
    path: '/campus/chashan',
    name: 'CampusChashan',
    component: CampusChashan
  },
  {
    path: '/campus/yueqing',
    name: 'CampusYueqing',
    component: CampusYueqing
  },
  {
    path: '/student-system',
    name: 'StudentSystem',
    component: StudentSystem
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router